<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script src="./index.js"></script>
<script>
	// 返回的永远都是一个新的Promise实例，且状态为rejected.接收的值即是失败值
	// const p1 = Promise.reject();
	// console.log(p1);// rejected undefined
	
	// const p1 = Promise.reject(1);
	// console.log(p1);// rejected 1
	
	const p1 = Promise.reject(new Promise(resolve=>resolve(200)));
	console.log(p1);// rejected 
</script>

</html>